package com.mhc.suzuki.constant;

/**
 * Created by HW
 * on 2017/8/15 11:00.
 */
public enum IsDeletedEnum {

    //正常
    NORMAL(0, "正常"),
    DELETED(1, "已删除");

    private Integer code;
    private String status;

    IsDeletedEnum(Integer code, String status) {
        this.code = code;
        this.status = status;
    }


    public Integer getCode() {
        return code;
    }

    public String getStatus() {
        return status;
    }


    public static String geStatusByCode(Integer code) {
        for (IsDeletedEnum item : IsDeletedEnum.values()) {
            if (item.getCode().equals(code)) {
                return item.getStatus();
            }
        }
        return "";
    }

}
